package com.ronsicecream.pos.transaction.opnameitemdetail;

import com.buanalintas.bynga.Action;
import com.buanalintas.bynga.Field;
import com.buanalintas.bynga.Page;
import com.ronsicecream.pos.entities.PosTransactionOpnameItemDetail;

/**
 *
 * Class OpnameDetail is ...
 *
 * Generated on Tue Sep 02 20:40:20 ICT 2014
 *
 * @version 1.0
 * @author Mr. Kazao™
 * @since Bynga 1.0
 *
 */
public class OpnameDetail extends Page {

    private Field opnameDetailId;
    private Field opnameDetailOldValue;
    private Field opnameDetailNewValue;
    private Field opnameDetailDescription;
    private Field opnameDetailOpnameId;
//    private Field posMasterStatus;
//    private Field posMasterSatuan;
    private Field opnameDetailItemId;

    public OpnameDetail() {
        super();

        setTheClass(PosTransactionOpnameItemDetail.class);




        opnameDetailId = new Field();
        opnameDetailId.setName("opnameDetailId");
        opnameDetailId.setCaption("opname detail id");
        //opnameDetailId.setInfo("opname detail id");
        opnameDetailId.setListProperties(" align=\"left\" width=\"1%\" nowrap");
        opnameDetailId.setInputProperties(" size=\"20\"");
        getFields().add(opnameDetailId);

        opnameDetailOldValue = new Field();
        opnameDetailOldValue.setName("opnameDetailOldValue");
        opnameDetailOldValue.setCaption("opname detail old value");
        //opnameDetailOldValue.setInfo("opname detail old value");
        opnameDetailOldValue.setListProperties(" align=\"left\" width=\"1%\" nowrap");
        opnameDetailOldValue.setInputProperties(" size=\"20\"");
        getFields().add(opnameDetailOldValue);

        opnameDetailNewValue = new Field();
        opnameDetailNewValue.setName("opnameDetailNewValue");
        opnameDetailNewValue.setCaption("value");
        opnameDetailNewValue.setRequired(true);
        opnameDetailNewValue.setListProperties(" align=\"left\" width=\"1%\" nowrap");
        opnameDetailNewValue.setInputProperties(" size=\"20\"");
        getFields().add(opnameDetailNewValue);

        opnameDetailDescription = new Field();
        opnameDetailDescription.setName("opnameDetailDescription");
        opnameDetailDescription.setCaption("description");
        //opnameDetailDescription.setInfo("opname detail description");
        opnameDetailDescription.setListProperties(" align=\"left\" width=\"1%\" nowrap");
        opnameDetailDescription.setInputProperties(" size=\"20\"");
        getFields().add(opnameDetailDescription);

        opnameDetailOpnameId = new Field();
        opnameDetailOpnameId.setName("opnameDetailOpnameId");
        opnameDetailOpnameId.setCaption("opname");
        //posTransactionOpnameItem.setInfo("pos transaction opname item");
        opnameDetailOpnameId.setListProperties(" align=\"left\" width=\"1%\" nowrap");
        opnameDetailOpnameId.setInputProperties(" size=\"20\"");
        getFields().add(opnameDetailOpnameId);

//        posMasterStatus = new Field();
//        posMasterStatus.setName("posMasterStatus");
//        posMasterStatus.setCaption("pos master status");
//        //posMasterStatus.setInfo("pos master status");
//        posMasterStatus.setListProperties(" align=\"left\" width=\"1%\" nowrap");
//        posMasterStatus.setInputProperties(" size=\"20\"");        
//        getFields().add(posMasterStatus);
//        
//        posMasterSatuan = new Field();
//        posMasterSatuan.setName("posMasterSatuan");
//        posMasterSatuan.setCaption("pos master satuan");
//        //posMasterSatuan.setInfo("pos master satuan");
//        posMasterSatuan.setListProperties(" align=\"left\" width=\"1%\" nowrap");
//        posMasterSatuan.setInputProperties(" size=\"20\"");        
//        getFields().add(posMasterSatuan);

        opnameDetailItemId = new Field();
        opnameDetailItemId.setName("opnameDetailItemId");
        opnameDetailItemId.setCaption("item");
        opnameDetailItemId.setRequired(true);
        opnameDetailItemId.setListProperties(" align=\"left\" width=\"1%\" nowrap");
        opnameDetailItemId.setInputProperties(" size=\"20\"");
        opnameDetailItemId.getSelectorColumns().add(new String[]{"itemName", " Nama", "width=\"40%\""});
        opnameDetailItemId.getSelectorColumns().add(new String[]{"itemCode", " Code", "width=\"10%\" nowrap"});
        opnameDetailItemId.getSelectorColumns().add(new String[]{"itemTypeId", " Type", "width=\"20%\""});
        opnameDetailItemId.getSelectorColumns().add(new String[]{"itemMinimum", " Minimum", "width=\"10%\""});
        opnameDetailItemId.getSelectorColumns().add(new String[]{"itemSatuanId", " Satuan", "width=\"10%\""});
        opnameDetailItemId.getSelectorColumns().add(new String[]{"itemRasaId", " Rasa", "width=\"10%\""});
        getFields().add(opnameDetailItemId);


        fillFields();

        getActions().add(Action.TRANS_DETAIL_LIST);
        getActions().add(Action.TRANS_DETAIL_ADD);
        getActions().add(Action.TRANS_DETAIL_EDIT);

        getFieldsAdd().clear();
        getFieldsAdd().add(opnameDetailItemId);
//        getFieldsAdd().add(opnameDetailStatusId);
        getFieldsAdd().add(opnameDetailNewValue);
        getFieldsAdd().add(opnameDetailDescription);

        getFieldsEdit().clear();
        getFieldsEdit().add(opnameDetailItemId);
//        getFieldsEdit().add(opnameDetailStatusId);
        getFieldsEdit().add(opnameDetailNewValue);
        getFieldsEdit().add(opnameDetailDescription);

        getFieldsList().clear();
        getFieldsList().add(opnameDetailItemId);
//        getFieldsList().add(opnameDetailStatusId);
        getFieldsList().add(opnameDetailNewValue);
        getFieldsList().add(opnameDetailDescription);

        getActions().add(Action.TRANS_DETAIL_LIST);
        getActions().add(Action.TRANS_DETAIL_ADD);
        getActions().add(Action.TRANS_DETAIL_EDIT);

    }
}
